<template lang="pug">
  view(class="content")
    CuCustom(bgColor="bg-gradual-pink" :isBack="true")
        block(slot="content") 列表

    view(class="task-list")
      TaskList(ref="taskList")
</template>

<script>
import BaseMixin from "../../mixins/BaseMixin.js";
import uniIcons from ".../../components/uni-icons/uni-icons.vue";
import TaskList from "./task-list.vue";

export default {
  components: { uniIcons, uniIcons, TaskList },

  mixins: [BaseMixin],

  data() {
    return {
      title: "Hello",

      tasks: [],

      new_task: {
        task_name: ""
      },

      cur_tab: "all"
    };
  },

  computed: {
    token() {
      return this.$store.state.token;
    }
  },

  methods: {
    add_new_task() {
   
    }
  },

  mounted() {
    this.$refs.taskList.get_tasks();
  },

  onLoad() {
  },

  onShareAppMessage(res) {
    let that = this;
    if (res.from === "button") {
      // 来自页面内分享按钮
      console.log(res.target);
    }
    return {
      title: "待办清单小程序",
      path: "/pages/index/index",
      imageUrl: null
    };
  }
};
</script>

<style lang="scss" scoped>
.content {
  .task-list {
    margin-bottom: 100rpx;
  }
  .action-bar {
    position: fixed;
    width: 100%;
    bottom: 0;
  }
}
</style>
